home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magic Publisher
/
Magic Publisher (1996)(Schatztruhe)(Disc 1 of 4).iso
/
FinalWriter4SE
/
FWInstall
/
Floppy
< prev
next >
Wrap
Text File
|
1996-04-01
|
9KB
|
347 lines
;;
;; $Final Writer Lite Cover Disk Floppy Installation Script British (UK) Version $
;; $Date: 1995/12/18 13:12:23 $
;; $Revision: 1.1 $
;;
(set is_update 0)
(set @user-level 1) ; force to use average mode
(complete 0)
; Installation Disk Names
;
(set #install_disk_1 "Disk 1")
(set #program_disk_1 "FWProgram")
(set #program_disk_2 "FWSystem")
(set #ram_disk "ram:")
(set #fw_drawer_name "FinalWriter_Lite_B")
; LHex file
;
(set #lhex_program
(cat #install_disk_1
":lhex"
))
; Format program
;
(set #format_program
(cat #install_disk_1
":Format"
))
; -------------------------------------------------------------------
; TEXT TRANSLATION SHOULD BEGIN HERE - Translate everything in quotes.
;
(set #ask_disk_prompt
(cat "\n\nPlease insert \"%s\" in any drive."
))
(set #ask_disk1_help
(cat "\"%s\" contains the Final Writer program, libraries, system fonts, and data files to be installed.\n\n"
@askdisk-help
))
(set #ask_disk_prompt_extra
(cat "\n(This is the disk that was most recently formatted.)"
))
(set #install_program "Installing Final Writer program from \"%s\".")
(set #install_program_icon "Installing Final Writer program and icon from \"%s\".")
(set #install_datafiles "Installing Data Files from \"%s\".")
(set #install_libs "Installing Libraries from \"%s\".")
(set #install_sysfonts "Installing System Fonts from \"%s\".")
(set #install_sampledocs "Installing Sample Documents from \"%s\".")
(set #install_program_err "Error installing Final Writer Program.")
(set #install_datafiles_err "Error installing Data Files.")
(set #install_libs_err "Error installing Libraries.")
(set #install_sysfonts_err "Error installing System Fonts.")
(set #install_ssmpledocs_err "Error installing Sample Documents.")
(set #kickstart_err
(cat "You must have Workbench 2.04 or greater to install Final Writer! "
"(Workbench version 37.67 and Kickstart 37.175 or greater.)"
))
(set #welcome_message
(cat "Welcome to the FinalWriter_Lite Floppy Disk Installation Utility. "
"You will need to have two (2) empty floppy disks available for the "
"installation. The installation procedure will format and install "
"the correct files to each floppy disk. Please note that all "
"previous data on each disk to be formatted will be lost. As a "
"precaution you should make sure that your installation disks "
"(Disk 1) are write protected.\n\n"
"The two disks created will be named "
#program_disk_1
", and "
#program_disk_2
"."
))
(set #insert_empty_message
(cat "Please insert an empty disk into drive df0:.\n\n"
"This disk will be formatted as \"%s\" and the correct files will be installed.\n\n"
"WARNING: All data currently on the disk will be lost! Click on \"Proceed\" "
"when you are sure that you have an empty disk in drive df0:."
))
(set #format_message
(cat "Disk \"%s\" is being formatted.\n"
"Please wait."
))
(set #format_err
(cat "Error formatting disk \"%s\"."
))
;
; TEXT TRANSLATION SHOULD END HERE - nothing below needs translation.
; -------------------------------------------------------------------
;==========================================
; Procedure to get and format an empty disk
;
; Inputs:
; format_disk_name - the name of the disk to format.
;
;==========================================
(procedure GetAndFormatDisk
(set @execute-dir "")
(set empty_disk 0)
(set last_disk 2)
(while (= empty_disk 0)
(
; Ask for empty disk.
;
(message (#insert_empty_message format_disk_name))
; Check if the inserted disk is empty.
; We will consider it empty if the disk is not one
; of our installation disks or one of the floppy
; disks that the installation has created.
;
(set which_disk 0)
(set no_go 0)
(set device_name (getassign "df0" "d"))
(while (AND (<= which_disk last_disk) (= no_go 0))
(
(set which_disk_name
(select which_disk
#install_disk_1
#program_disk_1
#program_disk_2
)
)
(if (= device_name (cat which_disk_name ":"))
(set no_go 1)
)
(set which_disk (+ which_disk 1))
)
)
(if (AND (= no_go 0) (> which_disk last_disk))
(set empty_disk 1)
)
)
)
(working (#format_message format_disk_name))
(set error
(run
("%s DRIVE DF0: NAME %s FFS NOICONS" Formatter format_disk_name)
)
)
(if error
(abort (#format_err format_disk_name))
)
)
;==========================================
; Procedure to get archive file and install
; its files to a program disk.
;
; Inputs:
; install_disk_name - the name of the installation disk the file is on.
; install_disk_help - help string for ask disk.
; lha_file - the name of the archive file
; program_disk_name - name of the program disk to install to
; new_drawer_name - name of drawer to create on program disk.
; empty string "" if no drawer needed.
; working_msg - message to display when installing
; error_msg - message in case of error.
;
;==========================================
(procedure InstallArchive
;
; Ask for the installation disk.
; (askdisk
; (prompt (#ask_disk_prompt install_disk_name))
; (help (install_disk_help install_disk_name))
; (dest install_disk_name)
;)
; Copy the lha file to ram:
(copyfiles
(source (cat install_disk_name ":" lha_file))
(dest #ram_disk)
)
; Ask for the program disk.
(askdisk
(prompt (cat (#ask_disk_prompt program_disk_name) #ask_disk_prompt_extra))
(help @askdisk-help)
(dest program_disk_name)
)
; Make the drawer.
(if new_drawer_name
(makedir (cat program_disk_name ":" new_drawer_name) (infos))
)
; Unarchive the lha files.
(set @execute-dir (cat program_disk_name ":" new_drawer_name))
(working (working_msg install_disk_name))
(set error
(run
("\"%s\" -f x \"%s\" >NIL:" DeArcher (cat #ram_disk lha_file))
)
)
(delete (cat #ram_disk lha_file))
(if error
(abort error_msg)
)
)
; Make sure we are running under V37 or higher...
(if (< (/ (getversion) 65536) 37)
(
(abort #kickstart_err)
)
)
(message #welcome_message)
; Copy the extraction and format utility
; to ram: and remember where they are.
(copyfiles
(source #lhex_program)
(dest #ram_disk)
)
(set DeArcher (tackon #ram_disk "lhex"))
(copyfiles
(source #format_program)
(dest #ram_disk)
)
(set Formatter (tackon #ram_disk "Format"))
; ==========================================
; Get and Format FWProgram: (program disk 1)
; ==========================================
(set format_disk_name #program_disk_1)
(GetAndFormatDisk)
; --------------------------
; Install the program.
;
(set install_disk_name #install_disk_1)
(set install_disk_help #ask_disk1_help)
(set lha_file "FinalWriter.lha")
(set program_disk_name #program_disk_1)
(set new_drawer_name "")
(set working_msg #install_program_icon)
(set error_msg #install_program_err)
(InstallArchive)
(complete 20)
; =========================================
; Get and Format FWSystem: (program disk 2)
; =========================================
(set format_disk_name #program_disk_2)
(GetAndFormatDisk)
; --------------------
; First install FWFiles...
;
(set install_disk_name #install_disk_1)
(set install_disk_help #ask_disk1_help)
(set lha_file "FWFiles.lha")
(set program_disk_name #program_disk_2)
(set new_drawer_name "FWFiles")
(set working_msg #install_datafiles)
(set error_msg #install_datafiles_err)
(InstallArchive)
(complete 40)
; ---------------------
; Now Install FWLibs...
;
(set install_disk_name #install_disk_1)
(set install_disk_help #ask_disk1_help)
(set lha_file "FWLibs.lha")
(set program_disk_name #program_disk_2)
(set new_drawer_name "FWLibs")
(set working_msg #install_libs)
(set error_msg #install_libs_err)
(InstallArchive)
(complete 60)
; ---------------------
; Now Install FWFonts...
;
(set install_disk_name #install_disk_1)
(set install_disk_help #ask_disk1_help)
(set lha_file "FWFonts.lha")
(set program_disk_name #program_disk_2)
(set new_drawer_name "FWFonts")
(set working_msg #install_sysfonts)
(set error_msg #install_sysfonts_err)
(InstallArchive)
(complete 80)
; ---------------------
; Now Install FWDocs...
;
(set install_disk_name #install_disk_1)
(set install_disk_help #ask_disk1_help)
(set lha_file "FWDocs.lha")
(set program_disk_name #program_disk_2)
(set new_drawer_name "FWDocs")
(set working_msg #install_sampledocs)
(set error_msg #install_sampledocs_err)
(InstallArchive)
; ---------------------
; Create empty ClipArt and TextClip drawers.
;
(makedir (cat #program_disk_2 ":FWClipArt") (infos))
(makedir (cat #program_disk_2 ":FWTextClips") (infos))
(delete DeArcher)
(delete Formatter)
(run ("C:Avail FLUSH"))
(complete 100)
(set @default-dest "")
(exit)